package com.lge.qcontact.threads;

import com.lge.qcontact.members.RegistMemberActivity;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;



/**
 * 
 * @author project
 * server DB에 user 정보를 등록하는 thread
 */
public class RegistAccountThread extends Thread {
	Handler rHandler;
	String tag = null;
	private String edituid = null;
	private String editupw = null;
	private String edituname = null;
	private String editemail = null;
	private String editmobile = null;
	private String editphoneno = null;
	private String editgname = null;
	private String editismaster = null;
	

	public RegistAccountThread(Handler handler, String uid, String upw, String uname, String email, String mobile, String phoneno, String gname, String ismaster) {
		rHandler = handler;
		edituid = uid;
		editupw = upw;
		edituname = uname;
		editemail = email;
		editmobile = mobile;
		editphoneno = phoneno;
		editgname = gname;
		editismaster = ismaster;
	}

	public void run() {
		Message msg = Message.obtain();
		Bundle data = new Bundle();
		StringBuffer str = new StringBuffer("http://192.168.0.205:8080/com.lg.project.myexample.cmd.WriteCmd.vcc?param=");
		str.append(edituid).append(",");
		str.append(editupw).append(",");
		str.append(edituname).append(",");
		str.append(editmobile).append(",");
		str.append(editphoneno).append(",");
		str.append(editemail).append(",");
		str.append(editgname).append(",");
		str.append(editismaster);
		
		data.putString("upload", str.toString());
		msg.setData(data);
		rHandler.sendMessage(msg);
	}
}
